<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('茶店员工列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">


        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:employee:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:employee:remove')}]];
    var positionDatas = [[${@dict.getType('employee_position')}]];
    var prefix = ctx + "system/employee";

    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "茶店员工",
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: '员工编号',
                },
                {
                    field: 'position',
                    title: '职位',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(positionDatas, value);
                    }
                },
                {
                    field: 'name',
                    title: '姓名'
                },
                {
                    field: 'phone',
                    title: '手机号'
                }]
        };
        $.table.init(options);
    });

    function submitHandler() {
        var employeeIds = $.table.selectFirstColumns();
        var data = {"employeeIds": employeeIds.join()};
        $.operate.save("/system/sendSalary/add", data);
    }
</script>
</body>
</html>